<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        .map {
            width: 800px;
            height: 600px;
            background-image: url('bg2.jpg');
            background-size: 800px 600px;
            //opacity: 0.7;
            position: relative;
        }
    </style>

</head>
<body>
    <div id="map" class="map"></div>
    <script src="Food.js"></script>
    <script src="snake.js"></script>
    <script src="Game.js"></script>
</body>

<script>
    //获取地图
    var map = document.getElementById('map');
    var game1 = new Game(map);
    game1.start();

    //测试食物
    // var food1 = new Food();
    // food1.render(map);
    //
    // //测试初始化蛇体
    // var snake1 = new Snake();
    // snake1.render(map);

</script>

</html>